Acid Jazz is an Apple Event based phone dialer for use with such applications as FileMaker Pro, HyperCard and QuicKeys. It is a simple application that can be controlled via the AppleEvent sending capabilities of these applications. It can be used with any application that has the ability to send custom events or the standard “Do Script” event.
Acid Jazz can also be used with Apple Script. It is both scriptable and recordable. It does not take full use of the AppleEvent Object Model, however, since very few applications can send object model commands at this time. Acid Jazz works by sending a custom, text based event or the “Do Script” event via its own scripting language.
ACID JAZZ IS NOT A FREE PROGRAM:
You may evaluate the program for a period not exceeding 15 days. If you wish to continue using the program, please send $15(US) to the following address:
P.O. Box 1645
San Jose, CA 95109-1645
U.S.A.
Make your checks payable to: Kevin J. Jundt
Acid Jazz is released as Shareware so feel free to distribute it to anybody who may find it useful. It cannot be distributed for profit without the prior approval of the author.
REQUIREMENTS:
Acid Jazz requires System 7.0 or greater. Older versions of the operating system do not support AppleEvents.
In order to use AppleScript to control Acid Jazz, you must have AppleScript installed on your machine. The included AppleScript example file is an AppleScript Script Editor document and will not open unless you have this application installed.
In order to control Acid Jazz from FileMaker Pro, you must have version 2.0 or greater (2.1 is recommended).
In order to control Acid Jazz from HyperCard, you must have version 2.1 or greater.
In order to control Acid Jazz from QuicKeys, you must have version 2.1 or greater. You must also have the Apple Events Extension installed.
REBUILD THE DESKTOP:
Since Acid Jazz is an application, it's important that applications sending it events are able to find it. Rebuilding the desktop will ensure that the directory on the disk is updated with all the necessary information. After decompressing Acid Jazz, therefore, it is essential that you rebuild your desktop file.
Hold down the Command & Option keys together as you start or restart your machine. Keep them held down during the boot process until you get a dialog box asking you if you want to rebuild the desktop on your drive. Click the OK button to begin the rebuild process.
SETTING PREFERENCES:
There are two events responsible for phone dialing. The first is a custom event that simply dials the phone with the default preferences. This means you need to manually set the preferences from Acid Jazz prior to sending your event. Your preferences will be saved so this only needs to be done the first time you use the application (or when switching from one dialing method to another).
1. Launch Acid Jazz
2. Choose “Preferences” from the File menu.
3. Set the options according to your needs.
The default preferences will work for most modems. The default method is to dial through the speaker. Choose either the modem or printer port if you wish to dial through your modem. Many of the port options such as Baud Rate, Stop Bits, etc... should not need to be changed for most modems. These options set the configuration of the Macintosh serial chip and have no effect on the speed of the modem itself. Baud Rate, for example, simply dictates the speed at which the computer communicates with the modem. They are configurable to provide as much flexibility as possible when working with high speed or non-standard modems.
Turn on Balloon Help to obtain more information about the different options in this dialog box.
Note: The default Configuration String “ATS0=0S7=5” should work with most modems. The AT command (short for Attention) tells Hayes compatible modems to expect some commands to follow. Setting the S0 register to 0 disables the Auto Answer mode of the modem. The S7 register sets the number of seconds the modem waits for a carrier signal. 5 seconds is generally enough to pick up the phone before the modem hangs up. If you want the modem to wait for a longer period, set this register to a higher value. Some high speed modems may need to use an alternate string “AT&DS0=0S7=5”. The additional &D enables the DTR override on these modems. Check your modem manual for more information on the commands it will except.
You can test your preferences by using the “Dial” command (Command-D) from the File menu. Enter a phone number and click the OK button to test your modem.
DIALING THE PHONE VIA APPLE EVENTS (METHOD 1):
The simplest event to use is the “DIAL” event. This event simply dials the phone using the preferences previously defined in the Acid Jazz application. This event also automatically quits Acid Jazz after it has dialed the specified number.
The Class of this event is ‘ACJZ’ and the ID is ‘DIAL’. The direct parameter should be of type ‘TEXT’.
SENDING A "DIAL" EVENT FROM FILEMAKER PRO 2.x:
1. Create a new script in your database.
2. Define the step “Send Apple Event”
3. Click the “Specify Application” button and select the Acid Jazz application (you may want to place it in your FileMaker Pro folder so you can easily locate it).
4. Choose "Other" from the Event menu and enter ‘ACJZ’ for the Class and ‘DIAL’ for the ID.
5. Check the "Bring target application to foreground" option.
6. Select the field contents item and choose your phone number field.
NOTE: If the target application listed at the top of this dialog displays as <unknown> even though you've already selected Acid Jazz, try rebuilding your desktop. Hold down your Option and Command keys together as you start or restart your computer. Keep them held down until you get a dialog asking if you want to rebuild the desktop. Click OK.
SENDING A "DIAL" EVENT FROM QUICKEYS:
The following example defines a QuicKey to automatically dial the contents of the clipboard. This is useful if you want to dial from an application that cannot send AppleEvents. Simply copy the phone number to the Clipboard and execute this QuicKey. You could also use QKIcons (included with QuicKeys) to create a double-clickable finder icon that would activate this macro. For more information on using QuicKeys, consult the manual included with the product.
1. Define an new Sequence specifying a name and a keystroke.
2. Within the sequence, define a File command and choose the Acid Jazz application. This will launch the application.
3. Within the sequence, define an AppleEvent Extension.
4. Choose Acid Jazz as the application (If it is not running use the Other menu item to select it).
5. Use the “Lookup from target” menu item and select the DialPhone event from the Acid Jazz Suite (this will automatically set the correct Class ( ‘ACJZ’ ) and ID ( ‘DIAL’ ).
6. Edit the direct parameter and select the “Get from Clipboard” radio button.
HyperCard cannot send custom events and therefore cannot use this format. Follow the directions in the next section to dial from HyperCard 2.1 or greater.
DIALING THE PHONE VIA APPLE EVENTS (METHOD 2):
Acid Jazz has its own scripting language that allows you to send it a script that can not only dial the phone but also configure the Acid Jazz application. To do this, you need to send the standard “Do Script” event. This event does not automatically quit Acid Jazz after completing but there is a script command to perform this function.
The Class of this event is ‘misc’ and the ID is ‘dosc’. The direct parameter should be of type ‘TEXT’.
The syntax of the Acid Jazz scripting language is quite simple. Each line can contain only one command followed by at least one space and a parameter. Multiple commands can be sent if separated by a carriage return. Case is not important. Acid Jazz will except upper or lower case or any combination of the two.
In FileMaker, for example, you can create a calculation field that concatenates your different commands together into a single script. This field would then be sent as the direct parameter of the event. Examine the included FileMaker Pro database for an example of such a calculation.
In HyperCard, you use the “Send” command to send “Do Script” events to other applications. Examine the included HyperCard example for an illustration of how to control Acid Jazz from HyperCard. Consult the “HyperCard 2.1 New Features Guide” included in the HyperCard Development Kit for information on the “Send” command.
SCRIPTING LANGUAGE SYNTAX:
To set the Baud Rate of the Macintosh port*:
baud <baud rate>
The parameter of this command must be one of the valid rates supported by the serial port. Valid rates are: 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 19200, 57600.
Example: baud 2400
To set the Parity of the Macintosh Serial Port*:
parity <parity type>
The parameter of this command must be one of the valid types supported by the serial port. Valid types are: none, odd, even.
Example: parity none
To set the number of data bits used by the Macintosh Serial Port*:
databits <number of databits>
The parameter of this command must be one of the valid values supported by the serial port. Valid values are: 5, 6, 7, 8.
Example: databits 5
To set the Stop Bits used by the Macintosh Serial Port*:
stopbits <number of stop bits>
The parameter of this command must be one of the valid values supported by the serial port. Valid values are: 1, 1.5, 2.
Example: stopbits 1
To set the Handshaking method used by the Macintosh Serial Port*:
handshake <method>
The parameter of this command must be one of the valid methods supported by the serial port. Valid methods are: none, xonxoff, dtrcts, dtronly, ctsonly.
Example: handshake none
To set the dialing type used by your modem*:
type <dialing type>
The parameter of this command must be either “tone” or “pulse”.
Example: type tone
To set the duration of delay when encountering a comma in a phone number**:
delay <seconds>
The parameter of this command must be a value between 1 and 5.
Example: delay 2
To set the port Acid Jazz will use when dialing:
port <port>
The parameter of this command must be either "modem", "printer" or "speaker".
Example: port speaker
To set the configuration string sent to your modem prior to dialing*:
config <configuration string>
The parameter of this command should be a valid configuration string understood by your modem. Consult your modem’s user guide for details on configuring your modem.
Example: config ATS0=0S7=5
To set a prefix to be automatically appended to the beginning of your phone number:
out <prefix>
The parameter of this command should be a value you want to automatically add to the beginning of each phone number. Codes for obtaining an outside line line or a long distance carrier code are examples of this.
Example: out 9,
To set the local area code:
local <local area code>
The parameter of this command should be the local area code. This command will cause the area code to be automatically stripped off when dialing local numbers.
Example: local 408
To set the dialing speed when dialing through the Macintosh speaker**:
speed <dialing speed>
The parameter of this command must be a value between 1 and 5. 1 = Fastest, 5 = Slowest.
Example: speed 3
To dial the phone:
dial <phone number>
The parameter of this command should be any valid phone number.
Example: dial (408) 555-1212
To quit the Acid Jazz application:
quit
This command has no parameter.
Example: quit
* Does not apply when dialing to the speaker
** Does not apply when dialing to a modem.
SPECIAL CHARACTERS:
You can place special modem commands and characters into your phone numbers to control the modem. A comma, for example, will cause the modem to pause for a specified period of time. This interval is determined by the settings of the modem and can be changed by your configuration string (consult your modem manual for details).
Most text will be ignored by your modem unless it is enclosed in quotes. When most modems encounter text in quotes, they will try to evaluate the text to the corresponding number on the telephone dial. For example, the number 976-“WAKE” would be converted by your modem to 976-9253.
Acid Jazz also performs both of these functions when dialing through the speaker.
APPLESCRIPT SUPPORT:
Acid Jazz supports AppleScript. It is fully scriptable and recordable. To record a script, open a new or existing script in the AppleScript Script Editor and click the Record button. In Acid Jazz, set your Preferences, dial a phone number, etc... All your actions will be recorded by AppleScript and added to the current script. Examine the included AppleScript example for an illustration of how to control Acid Jazz from AppleScript.